#-*- coding:utf-8 -*-
#--- FRAMEWORK IMPORTS ---
from django.conf.urls.defaults import *

#--- APP IMPORTS ---
from forum import views

urlpatterns = patterns('',
    
    # shows home page
    # mostra a pagina inicial
    url(r'^$', views.expose_index, name="forum-index"),

    # -------------
    
    url(r'^send/pvt/(?P<username>[\w\d\_]+)/$', views.send_pvt, name="forum-send_pvt"),
    
    url(r'^profile/edit/$', views.expose_edit_profile, name='forum-user-profile-edit'),
    
    url(r'^profile/friends/$', views.expose_friends, name="forum-user-friends"),
    
    url(r'^profile/friends/(?P<username>[\w\d\_]+)/add/$', views.expose_add_friend, name="forum-user-friends-add"),
    
    url(r'^profile/friends/(?P<username>[\w\d\_]+)/remove/$', views.expose_remove_friend, name="forum-user-friends-remove"),
    
    url(r'^profile/messagebox/$', views.message_box, name="forum-user-message_box"),
    
    url(r'^profile/messagebox/(?P<message_id>\d+)/$', views.message_box, name="forum-user-message_box"),
    
    url(r'^profile/messagebox/(?P<message_id>\d+)/remove/$', views.del_pvt_msg, name="forum-user-message_box-del"),
    
    url(r'^user/(?P<username>[\w\d\_]+)/profile/$', views.user_profile, name="forum-user-profile"),
    
    url(r'^user/(?P<username>[\w\d\_]+)/gallery/$', views.expose_gallery, name="forum-user-gallery"),
    
    url(r'^user/(?P<username>[\w\d\_]+)/gallery/(?P<name>[\w\d\_]+)/$', views.expose_gallery, name="forum-user-gallery"),
    
    url(r'^user/(?P<username>[\w\d\_]+)/gallery/(?P<name>[\w\d\_]+)/(?P<item_id>\d+)/$', views.expose_gallery, name="forum-user-gallery"),
    
    # id-slug
    url(r'^forum/(?P<pk>\d+)-(?P<slug>[\d\w\_\-]+)/$', views.expose_forum, name="forum-expose"),
    url(r'^forum/(?P<pk>\d+)-(?P<slug>[\d\w\_\-]+)/post/$', views.expose_post, name="forum-post"),

    url(r'^forum/(?P<pk>\d+)-(?P<slug>[\d\w\_\-]+)/follow/$', views.expose_follow, {'active':True}, name="forum-follow"),
    url(r'^forum/(?P<pk>\d+)-(?P<slug>[\d\w\_\-]+)/unfollow/$', views.expose_follow, {'active':False}, name="forum-unfollow"),
    
    url(r'^topic/(?P<pk>\d+)-(?P<slug>[\d\w\_\-]+)/$', views.expose_topic, name="forum-topic"),
    url(r'^topic/(?P<pk>\d+)-(?P<slug>[\d\w\_\-]+)/reply/$', views.expose_reply, name="forum-reply"),
    url(r'^topic/(?P<pk>\d+)-(?P<slug>[\d\w\_\-]+)/report/$', views.report_abuse, name="forum-report_abuse"),
    
    url(r'^reply/(?P<pk>\d+)/edit/$', views.expose_edit_reply, name="forum-reply-edit"), # edita resposta
    url(r'^reply/(?P<pk>\d+)/del/$', views.expose_del_reply, name="forum-reply-del"), # apaga resposta
    
    #url(r'^rating/(?P<post_id>\d+)/rate/$', views.rate_post, name="forum-rating-rate"),
    
    url(r'^search/$', views.search, name="forum-search"),

    url(r'^moderate/(?P<pk>\d+)-(?P<slug>[\d\w\_\-]+)/$', views.expose_moderate, name="forum-moderate"),
    #url(r'^list/(?P<what>[\w\d\_]+)/$', views.list_items, name="forum-list"),
    
)
